##############################################################
#Figure E1: Gtrends Result: Hurricane Proximity and FEMA Searches
##############################################################

df <- read.dta13("./temp/fige1data.dta")

newdf <- df %>% 
  gather(variable, value, -var)%>%
  spread(var, value)

newdf$id <- 1
ggplot() + 
  geom_pointrange(data=newdf, mapping=aes(x=id, y=new2min_coef, ymin=new2min_ci_upper, 
                                          ymax=new2min_ci_lower), color="black", size=1, fatten=2) +
  coord_flip() + 
  theme_bw() + 
  ylim(-5,10) +
  scale_x_discrete(limit=c("1"), labels= c("FEMA")) + 
  xlab("Keyword Searched")  + ylab("Estimate") +
  theme(panel.grid.major = element_blank(),
        axis.text = element_text(size=15), 
        axis.title = element_text(size=18)) +
  geom_hline(yintercept=0, col="grey60", lwd=1, lty="dashed") 

ggsave("./figures/fige1.pdf")

